#!/bin/bash

if [ "$#" -lt 1 ]; then
    echo "Usage: $0 <env-file> [--auto]"
    exit 1
elif [ ! -f "$1" ]; then
    echo "ABORTING: specified env-file not found: $1"
    exit 1
else
    echo "Using $1 for IAM creds..."
    source $1

   if [ "$2" = "--auto" ]; then
      lein test-auto
   else
      export TIMBRE_LOG_LEVEL="trace"
      # lein expectations "taoensso.carmine.tests.tundra"
      # lein expectations "taoensso.carmine.tests.main"
      # lein expectations "taoensso.carmine.tests.message-queue"
      lein test-all
    fi
fi
